package com.example.javasample.controller;

import com.example.javasample.domain.VehicleDO;
import com.example.javasample.service.IVehicleService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * VehicleController
 *
 * @author Kylin
 */
@Tag(name = "交通工具")
@RestController
@RequestMapping("/vehicle")
public class VehicleController {

    @Autowired
    private IVehicleService vehicleService;

    @ApiOperationSupport(order = 1)
    @Operation(summary = "列表", description = "")
    @GetMapping(value = "/list")
    public List<VehicleDO> list(@ParameterObject VehicleDO vehicle) {
        return vehicleService.list(vehicle);
    }

}
